import React from 'react'
import { useTranslation } from 'react-i18next';
import './LanguageContext'


function i18nnn() {
  const { t, i18n } = useTranslation();

  const arr=()=>{
    i18n.changeLanguage(i18n.language==='zh'?'en':'zh')
  }
  return (
    <div>
      <h1>{t('hellow')}</h1>
      <button onClick={arr}>{i18n.changeLanguage==='zh'}切换</button>
    </div>
  )
}

export default i18nnn
